<template>
  <div class="eva">
    <div class="top">
      <span>用户评价</span>
      <span style="float:right; font-weight: 500;">更多</span>
    </div>
    <div class="center">
      <div class="logo">
        <img :src="goodseva.logo" alt="" class="img">
      </div>
      <div class="name">{{goodseva.name}}</div>
    </div>
    <div class="bottom">
      <span style="font-size:15px;color: rgb(143, 143, 143);">{{goodseva.content}}</span><br>
      <span style="font-size:11px;color: rgb(143, 143, 143);margin-right:10px">{{goodseva.time | getDate()}}</span>
      <span style="font-size:11px;color: rgb(143, 143, 143);">{{goodseva.style}}</span>
    </div>
  </div>
</template>

<script>

import {formatData} from 'common/utils.js'

export default {
  name: 'detailEva',
  props:{
    goodseva:{
      type:Object,
      default(){
        return {}
      }
    }
  },
  filters:{
    getDate(value){
      const date = new Date(value *1000) //毫秒转换成秒
      return formatData(date, 'yyyy-MM-dd')
    }
  }
}
</script>

<style scoped>
  .eva{
    border-top:8px rgba(189, 189, 189, 0.274) solid;
    margin-top: 20px;
    width: 100%;
    
  }

  .top{
    margin:10px auto;
    width:90%;
    height: 40px;
    line-height: 40px;
    border-bottom: solid 1px rgba(196, 196, 196, 0.589);
    color: rgb(128, 128, 128);
  }

  .img{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin:10px 10px;
  }

  .center{
    height: 40px;
    line-height: 40px;
  }

    .logo{
      float: left;
      width: 40px;
      height: 40px;
    }
    .name{
      float: right;
      width: 80%;   
      height: 40px;
      line-height: 40px;
      margin-top: 10px;
      color: rgb(99, 99, 99);
    }

  .bottom{
    margin-top: 25px;
    margin-left: 10px;
  }
</style>